Public Class LoginForm

    Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click

        Dim protocol As String
        If My.Settings.Https Then
            protocol = "https://"

        Else
            protocol = "http://"

        End If

        My.Settings.IWebExplorer_IWeb_WebService = protocol & My.Settings.WebServiceAddress & _
            FileManagerViewPresenter.STR_WebServicePath

        My.Settings.Save()

        Me.DialogResult = Windows.Forms.DialogResult.OK
        Me.Close()

    End Sub

    Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click
        Me.DialogResult = Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

    Private Sub EncryptedCheckBox_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EncryptedCheckBox.CheckedChanged

        Me.KeyTextBox.Enabled = Me.EncryptedCheckBox.Checked

    End Sub

    Private Sub LoginForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Me.HttpRadioButton.Checked = Not My.Settings.Https

    End Sub
End Class
